Repository navigation
Conversation
On a release version the background version check races httpretty's shared fake-socket state and can corrupt a mocked request body, which made test_deploy_bundle fail intermittently. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
tdstein
marked this pull request as draft
November 12, 2026 15:02
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Collaborator
Author
|
I don't think this addresses the real issue. Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_deploy_bundlefails intermittently withCould not connect to http://fake_server (RemoteDisconnected)whenever the version is a release version. It blocked the 1.33.2 tag build and also failed on 1.33.1 and #955.On a release version,
deploychecks PyPI for a newer version in a background thread. httpretty's fake socket keeps sent data in a class-level list (_sent_data = []) shared by every socket, and reads a request body back as the last item in that list. When the PyPI request lands in between, the mockedPOST /deploygetsGET /pypi/rsconnect-python/json …as its body. The test callback raisesJSONDecodeError, httpretty sends an empty response, and the client reportsRemoteDisconnected.This adds an autouse fixture that sets
RSCONNECT_DISABLE_VERSION_CHECK=1.tests/test_version_check.pyremoves the variable in its own fixture, so those tests still run the check.Evidence
post_application_deploy_callback→_load_json(request.body)→JSONDecodeError … (char 0), with a PyPI request a few milliseconds before the failure.test_deploy_bundlemakes no PyPI request.tests/test_version_check.pypasses, and the full suite passes on 3.14 locally excepttest_quickstart.py, which fails the same way onmainbecause of a local in-repo uv cache.🤖 Generated with Claude Code